package com.cainaer.product.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cainaer.product.domain.ProductFullReduction;
import com.cainaer.product.mapper.ProductFullReductionMapper;
import com.cainaer.product.service.IProductFullReductionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 商品满减表 服务实现类
 * </p>
 *
 * @author Tina
 * @since 2020-09-11
 */
@Service
public class ProductFullReductionServiceImpl extends ServiceImpl<ProductFullReductionMapper, ProductFullReduction> implements IProductFullReductionService {

    @Autowired
    private ProductFullReductionMapper productFullReductionMapper;

    /**
     * 新增商品满减数据
     *
     * @param productFullReduction
     * @return
     */
    @Override
    public Integer insertProductFullReduction(ProductFullReduction productFullReduction) {
        return productFullReductionMapper.insert(productFullReduction);
    }


    /**
     * 编辑商品满减数据
     *
     * @param productFullReduction
     * @return
     */
    @Override
    public Integer editProductFullReduction(ProductFullReduction productFullReduction) {
        return productFullReductionMapper.updateById(productFullReduction);
    }
}
